<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
	  	<base href="<%=basePath%>">
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>管理员信息页面</title>
		<link href="back/css/main.css" rel="stylesheet" type="text/css" />
		<script type="text/javascript" src="back/js/jquery-1.7.2.js"></script>
		<script  type="text/javascript">
			function realDeleteAll(ids, action,form, type) {
				try {
					var chks = $("input[name=ids]:checked");
					if(chks.size() <= 0) {
						alert('请选择要批量操作的数据!');
					} else {
					    if(confirm('是否确认全部删除? 删除后不可恢复!!')) {
					    	var f = $("#"+form);
							f.attr("action", action + "_realDeleteAll.system?id="+ type);
							f.submit();
					    } else {
							return false;
						}
					}
					return false;
				}catch(e) {
				}
			}
		</script>	
		
	</head>

	<body>
		<div class="content">
			<div class="con_1">
				<div class="con_11"></div>
				<div class="con_13">
				</div>
				<div class="con_12">
					<div class="con_121">
						<span class="curloc">你当前的位置：</span><span class="">[管理员]-[管理员信息]</span>
					</div>
					<div class="con_122">
					</div>
				</div>
			</div>
			<div class="con_2">
				<form id="userForm" name="userForm" method="post">
		<div style="padding-top: 10px; padding-left: 0px; padding-right: 5px;">
			<table width="98%" border="1" align="center" cellpadding="1"
				cellspacing="1" bordercolor="#59D6FF">
				<tr>
					<td height="35" colspan="8" bgcolor="#FFFFFF">
						&nbsp;<img src="back/images/list.gif" />
						<a href="admin_insert.action"><input type="button" value="新增用户" /></a>
						<a href="adminList_find.action"><input type="button" value="管理用户" /></a>
					</td>
				</tr>
				<tr>
					<td height="35" style="font-size:13px;" align="center" bgcolor="#FFFFFF">
						全选
					</td>
					
					<td height="35" style="font-size:13px;" align="center" bgcolor="#FFFFFF">
						登陆名称
					</td>
					
					<td height="35" style="font-size:13px;" align="center" bgcolor="#FFFFFF">
						真实姓名
					</td>
					<td height="35" style="font-size:13px;" align="center" bgcolor="#FFFFFF">
						是否启用
					</td>
					
					<td height="35" style="font-size:13px;" align="center" bgcolor="#FFFFFF">
						操作选项
					</td>
				</tr>
				<s:iterator value="adminList" id="al">
					<tr>
						<td align="center">
							<input type="checkbox" name="ids" value="<s:property value='#al.adminId' />" />
						</td>
						
						<td align="center" height="40">
							<s:property value="#al.name" />
						</td>
						
						<td align="center">
							<s:property value="#al.realname" />
						</td>
						<td align="center">
							<s:if test="#al.permState==true">
								<a href="admin_check.action?admin.adminId=<s:property value='#al.adminId' />&pageNo=<s:property value='pageNo' />" title="点击禁用用户">
									<img border="0" src="back/images/ysh.gif" />
								</a>
							</s:if>
							<s:elseif test="#al.permState==false">
								<a href="admin_check.action?admin.adminId=<s:property value='#al.adminId' />&pageNo=<s:property value='pageNo' />" title="点击启用用户">
									<img border="0" src="back/images/wsh.gif" />
								</a>
							</s:elseif>
								
						</td>
						
						<td align="center">
							
							<a href="admin_find.action?admin.adminId=<s:property value='#al.adminId' />" title="点击编辑用户信息"><img border="0" src="back/images/edit.gif" /></a>
							&nbsp;&nbsp;
							<a href="admin_del.action?admin.adminId=<s:property value='#al.adminId' />" title="点击删除用户"
								onclick="if(confirm('是否确认删除该用户信息?')){return true;}else{return false;}"><img border="0" src="back/images/remove.gif" /></a>
						</td>
					</tr>
				
				</s:iterator>
						
				<tr>
					<td colspan="8" style="font-size: 13px;text-align: center;line-height: 30px;">
						共有<s:property value="totalCount" />条记录
						当前第<s:property value="pageNo" />/<s:property value="pageCount" />页
					
						<a href="adminList_find.action?pageNo=1" title="跳转到首页"><img src="back/images/first.gif" /></a>
						<s:if test="pageNo>1" >
				   			<a href="adminList_find.action?pageNo=<s:property value='pageNo-1' /> ">
				   			<img alt="上一页" src="back/images/back.gif">
						</s:if>  
														
						<s:if test="%{pageNo>1}">
							</a>
						</s:if>
					           											
					   	<s:if test="pageNo<pageCount">
							<a href="adminList_find.action?pageNo=<s:property value='pageNo-1' />">
							<img alt="下一页" src="back/images/next.gif">
						</s:if>	
						                 		
					    <s:if test="%{pageNo+1<pageCount}">
					    	
					  		</a>
						</s:if>
						<a href="adminList_find.action?pageNo=<s:property value='pageCount' />" title="跳转到末页"><img alt="上一页" src="back/images/last.gif"></a>
						转到第<input type="text" name="pageNo" width="1px" />页<a href="adminList_find.action"><img alt="转" src="back/images/go.gif"></a>
					</td>
				</tr>
			</table>
		</div>
		</form>
				
			</div>
			
		</div>
	</body>
</html>
